<script>
import {
  defineComponent,
  reactive,
  toRefs
} from 'vue'

export default defineComponent({
  name: 'SaveButton',
  props: {
    width: {
      type: Number,
      default: 180
    }
  },
  setup() {
    const state = reactive({})

    return {
      ...toRefs(state)
    }
  }
})
</script>

<template>
  <div class="component-save-button-container" :style="{ width: `${width}px` }">
    <div class="icon" />
    <span class="title">保存</span>
  </div>
</template>

<style lang="scss">
.component-save-button-container {
  background-color: #FE6266;
  color: #ffffff;
  height: 32px;
  margin-top: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  cursor: pointer;

  .icon {
    width: 20px;
    height: 20px;
    background-image: url('../assets/components/save-card--save.png');
    background-size: cover;
    margin-right: 12px;
  }

  .title {
    font-size: 14px;
  }
}
</style>
